#include "WSGlobal.h"

WS_NS_CORE_BEGIN

GLuint WSGLState::s_vaoID = 0;
GLuint WSGLState::s_vertexVboID = 0;

void WSGLState::Init()
{
	glShadeModel(GL_SMOOTH);
	glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
	glClearDepth(1.0f);
	
	glEnable(GL_DEPTH_TEST);
	glEnable(GL_TEXTURE_2D);

	glEnableClientState(GL_VERTEX_ARRAY);
	glEnableClientState(GL_TEXTURE_COORD_ARRAY);

	glDepthFunc(GL_LEQUAL);
	glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);

	glewInit();
	glGenBuffers(1, &s_vaoID);
	glGenBuffers(1, &s_vertexVboID);
}

inline GLuint WSGLState::GetVaoID()
{
	return s_vaoID;
}

inline GLuint WSGLState::GetVertexVboID()
{
	return s_vertexVboID;
}

WS_NS_CORE_END